package net.csdra.libraryborrowing.service.user;

import net.csdra.libraryborrowing.domain.Message;
import net.csdra.libraryborrowing.service.PageEntity;
import org.springframework.data.domain.Page;

/**
 * Created by msf on 2017/10/16.
 */
public interface UserMessageService {
    public Message sendMessage(SendMessage sendMessage);

    //根据read获取当前用户所有messagte
    public Page<Message> getMessagePage(GetMessagePage getMessagePage);

    class SendMessage {
        //接收用户Id
        String targetUserId;
        String content;
    }

    class GetMessagePage extends PageEntity {
        boolean read;

        public boolean isRead() {
            return read;
        }

        public void setRead(boolean read) {
            this.read = read;
        }
    }
}
